import base from '/@/api/base';
import Axios from '/@/utils/Axios';

export function getArticleInfo(data: any): Promise<any> {
    return Axios.post(base.getArticleInfo, data);
}

export function deleteArticle(id: string): Promise<any> {
    return Axios.post(base.deleteArticle, {id});
}

export function istop(data: any): Promise<any> {
    return Axios.post(base.istop, data);
}

export function delArticleTag(data: any): Promise<any> {
    return Axios.post(base.delArticleTag, data);
}

export function addArticleTag(data: any): Promise<any> {
    return Axios.post(base.addArticleTag, data);
}

export function getArticleEdit(id: string): Promise<any> {
    return Axios.post(base.getArticleEdit, {id});
}

export function uploadArticleInfo(params: any): Promise<any> {
    return Axios.post("/backapi/uploadArticleInfo", params);
}

export function updateArticleInfo(params: any): Promise<any> {
    return Axios.post("/backapi/updateArticleInfo", params);
}

export function uploadArticleeCover(params: any): Promise<any> {
    return Axios.post(base.uploadArticleeCover, params);
}

export function delCoverImg(params: any): Promise<any> {
    return Axios.post(base.delCoverImg, params);
}
